Spring Integration Essentials by Chandan Pandey

Spring Integration Essentials by Chandan Pandey

Author:Chandan Pandey [Pandey, Chandan]
Language: eng
Format: epub
Publisher: Packt Publishing
Published: 2015-02-20T05:00:00+00:00


Maven entry can be added by using the following code snippet:<dependency> <groupId>org.springframework.integration</groupId> <artifactId>spring-integration-twitter</artifactId> <version>${spring.integration.version}</version> </dependency>

Receiving tweets

Spring Integration has exposed inbound adapters for receiving tweets. Twitter tweets are of different types, and Spring provides support for receiving tweets as Timeline Updates, Direct Messages, Mention Messages, as well as Search Results.

Spring's inbound adapter is a polling-based mechanism that polls the Twitter site for updates at defined intervals. Be aware of Twitter's Rate Limiting; it limits the rate at which an application can poll for the updates. Factor this when setting the polling interval so that it's in compliance with the Twitter policies. Let's look at a working code snippet:

<int-twitter:inbound-channel-adapter id="testTweet" twitter-template="twitterTemplate" channel="twitterChannel"> </int-twitter:inbound-channel-adapter>



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.